<?php
	
	session_start();
	require("connect.php");
	$link = connect_APO();
				
	require("check.php");
	is_admin();
	
	require("header+logoutB.php");
	headerL();
	
	$personID = $_GET['new_MC'];
	$meID = $_SESSION['ID'];
	
	$sql = "UPDATE `users` SET `MC` = '1' WHERE `users`.`ID` = '$personID'";
	$result= mysql_query($sql);
	
	$sql = "UPDATE `users` SET `MC` = '0' WHERE `users`.`ID` = '$meID'";
	$result= mysql_query($sql);
	
	echo "<html>
	<head>
		<title>Switched Midweek Coordinators</title>
		<meta http-equiv='refresh' content='5; URL=logout.php'>
	</head>
	<body>
	<center>
	<font class='mainFont'>Midweek Coordinators have been switched. You will be logged out in 5 seconds.</font>
	</center>
	</body>
	</html>";
	
		require("footer.php");
	footer();
	mysql_close($link);
?>